<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>添加商品属性名</title>
		<style>
		input{border:none;background-color:#E0FFFF; height: 40px; }
	</style>
	<link rel="stylesheet" href="{{ asset('admin_style/css/pintuer.css') }}">
   <link rel="stylesheet" href="{{ asset('admin_style/css/admin.css') }}">
    <script src="{{asset('admin_style/js/jquery.js')}}"></script>
    <script src="{{asset('admin_style/js/pintuer.js')}}"></script>
</head>
<body>
<div class="panel-head"><strong><span class="icon-reorder"></span>商品属性名</strong></div>
	<div class="body-content" style="padding: 20px;">
	  <div class="field">
	  <form action="{{ url('goods/attr_CateDo')}}" method="post">
  		<select class="input" name="cate" id="select">
  			<option value="">请选择分类</option>
  			@foreach($data as $v)
				<option value="{{$v->cate_id}}">{{$v->cate_name}}</option>
  			@endforeach
  		</select>
		</div>
		<div>
			
		属性名：<input type="text"  name="attr_name[]" id="" size="50px" placeholder="请填写属性值"><span id="add">[+]</span><br />
		<div class="aa"></div>
		<input type="hidden" name="_token" value="{{ csrf_token()}}">
		<input type="submit" value="添加" class="button bg-green">
    	<input type="reset" name="button" id="button" value="重置" class="button bg-red">
	</form>
		</div>
  </div>
</body>
</html>
<script type="text/javascript" src="{{asset('admin_style/js/jquery.js')}}"></script>
<script>
	$('#add').click(function(){
		str = '<span id="dd">属性名：<input type="text" name="attr_name[]" size="50px" placeholder="请填写属性值"><span id="del">[-]</span><br /></span>';
		$('.aa').append(str);
	});
	$('.aa').on('click','#del',function(){
		$('#dd').remove();
	});
</script>